import {createApp} from 'vue';
import {createRouter, createWebHistory,} from 'vue-router';
import ManagerIndex from "../views/ManagerIndex.vue";
import ProductManager from "../views/ProductManager.vue";
import OrderManager from "../views/OrderManager.vue";
import AppointmentManager from "../views/AppointmentManager.vue";
import AdminManager from "../views/AdminManager.vue";
import Login from "../views/Login.vue";
import UserManager from  "../views/UserManager.vue"
import CommunityManager from "../views/CommunityManager.vue";


// 创建路由实例
const routes = [
    {
        path: '/',
        component: Login
    },
    {
        path: '/login',
        component: Login
    },
    {
        path: '/index',
        component: ManagerIndex,
    },
    {
        path: '/productManager',
        component: ProductManager,
    },
    {
        path: '/orderManager',
        component: OrderManager,
    },
    {
        path: '/appointmentManager',
        component: AppointmentManager,
    },
    {
        path: '/userManager',
        component: UserManager,
    },
    {
        path: '/communityManager',
        component: CommunityManager,
    },
    {
        path: '/adminManager',
        component: AdminManager,
    }
];

const router = createRouter({
    history: createWebHistory(), // 使用 HTML5 History 模式,去掉网址路径中的#号
    routes,
});


export default router;